package other.acm;


import java.util.*;   
import java.text.*;   

public class poj1401 {
	

	
	public static void main(String args[]){
		
		Scanner sn=new Scanner(System.in);
		String[] s=new String[2];
		
		boolean result;
		
		while(sn.hasNext()){
			
			s=sn.nextLine().split(" ");
			
			char[] c1 = s[0].toCharArray();   
			char[] c2 = s[1].toCharArray();   			
			int index = 0;   
			
			char c3 = '\n';			
			result = false;
			System.out.println("**===========================" );
			for(int i = 0; i < c2.length; i++) {   
				c3 = c2[i];   
				System.out.println("** ===========================" );
				System.out.println("** index="+index );
				System.out.println("** c3="+c3 );
				System.out.println("** c1[index]="+c1[index] );
				System.out.println("** ===========================" );
				
				if(c3 != c1[index]){   
					System.out.println("===========================" );
					System.out.println("index="+index );
					System.out.println("c3="+c3 );
					System.out.println("c1[index]="+c1[index] );
					System.out.println("===========================" );
					continue;   
				}else{   
					if(index == c1.length-1){   
						result= true;  
						System.out.println("===========================" );
						System.out.println("index="+index );
						System.out.println("c3="+c3 );
						System.out.println("c1[index]="+c1[index] );
						System.out.println("===========================" );
					}else{  
						index ++;
					}
				}   
			}   
			
			if(result == true)   
				System.out.println("Yes");   
			else  
				System.out.println("No");   
		}
	}   

}  
